﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekEdit.aspx.cs" Inherits="Web.WeekEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <base target="_self" />
    <meta content="ie=7" http-equiv="x-ua-compatible">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <script src="Content/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Scripts/easy_validator.pack.js" type="text/javascript"></script>
    <link href="Styles/Style01.css" rel="stylesheet" type="text/css" />
    <link href="Styles/validate.css" rel="stylesheet" type="text/css" />
    <style>
        body{margin-top: 20px;}
        .Wdate{height: 16px;}
        input[type=text], textarea
        {
            width: 100%;
            margin-left: -1px;
            color: #0099cb;
        }
        textarea{overflow-y: hidden;}
        table.s1 td
        {
            padding: 0 1px;
            height: 24px;
        }
        .tdLeft{text-align: left;}
        .divDdl
        {
            position: relative;
            border: 1px solid #778899;
            width: 135px;
            height: 19px;
            overflow: hidden;
        }
        select
        {
            position: relative;
            left: -2px;
            top: -2px;
            width: 138px;
            line-height: 18px;
            border: 0px; /*color:#909993;*/
        }
        /*Start:兼容ie6的样式*//*End:兼容ie6的样式*/
    </style>
    <script type="text/javascript" language="javascript">
        $(function () {
            $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
            $("#btnSave").click(function () {
                var isSubmit = true;
                $("form").find("[reg],[url]:not([reg])").each(function () {
                    if (!validate($(this), this.tagName)) {
                        isSubmit = false;
                    }
                });
                if (!isSubmit) {
                    alert("请确认'红字或红框'处的输入正确!");
                    return false;
                }
                return true;
            });
            $("textarea").each(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
            $("textarea").keydown(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
        });
    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <table class="s1">
        <tr>
            <td width="10%">表单编号</td>
            <td width="40%"><%=weekly.FormNo%></td>
            <td width="10%">填写时间</td>
            <td><%=weekly.CreatDate.ToString("yyyy-MM-dd")%></td>
        </tr>
        <tr>
            <td>开始日期</td>
            <td><input id="BeginDate" runat="server" class="Wdate" onclick="WdatePicker();" title="格式:yyyy-MM-dd!" reg="."></td>
            <td>结束日期</td>
            <td><input id="EndDate" runat="server" class="Wdate" onclick="WdatePicker();" title="格式:yyyy-MM-dd!" reg="."></td>
        </tr>
        <tr>
            <td>周报人</td>
            <td><%=empName%></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>本周总结</td>
            <td colspan="3"><textarea id="Summary" runat="server" title="不能为空!" reg="."></textarea></td>
        </tr>
        <tr>
            <td>下周计划</td>
            <td colspan="3"><textarea id="TxtPlan" runat="server" title="不能为空!" reg="."></textarea></td>
        </tr>
        <tr>
            <td>建议</td>
            <td colspan="3"><textarea id="Suggestion" runat="server"></textarea></td>
        </tr>
        <tr>
            <td>感悟</td>
            <td colspan="3"><textarea id="Inspiration" runat="server"></textarea></td>
        </tr>
        <tr>
            <td>提高</td>
            <td colspan="3"><textarea id="Improve" runat="server"></textarea></td>
        </tr>
    </table>
<div style="text-align:right;margin-right:24px;margin-top:6px;">
    <asp:button runat="server" text="保存" CssClass="btn" id="btnSave" onclick="btnSave_Click"/>
    <asp:button runat="server" text="提交" CssClass="btn" id="btnSubmit" onclick="btnSubmit_Click"/>
    <input type=button value="关闭" class="btn" onclick="window.close();" />
</div>
    </form>
</body>
</html>